function a() {
    return new Promise((resolve,reject) => {
        setTimeout(() => {
            console.log('aaa');
            resolve('ok')
        },1000)
        
    })
    
}

function b() {
    return new Promise((resolve,reject) => {
        setTimeout(() => {
            console.log('bbb');
            resolve('okk')
        },400)
        
    })
    
}

function c() {
    setTimeout(() => {
        console.log('ccc');
    },200)
}
// a().then(b).then(c)

// Promise.all([a(),b()]).then(c)

Promise.race([a(),b()]).then(c)